<html>
<head>
    <meta charset="utf-8"/>
    <script src="wasm_exec.js"></script>
    <script>
        const go = new Go();
        WebAssembly.instantiateStreaming(fetch("main.wasm"), go.importObject).then((result) => {
            go.run(result.instance);
        });
    </script>
    <style>
        html {
            font-family: Arial, serif;
        }
    </style>
</head>
<body>
<div>
    <label for="inputField">Enter strings in lower case </label>
    <input id="inputField" name="input" type="text">
    <div id="outputString" style="font-size: 40px"></div>
</div>
<script>
    var inputField = document.querySelector('#inputField')
    var outputString = document.querySelector('#outputString')
    inputField.addEventListener('keyup', function () {
        outputString.innerHTML = wasmHash(inputField.value) 
    });
</script>
</body>
</html>